package com.woniuxy.dudugua.repo;

import com.woniuxy.dudugua.entity.Product;
import com.woniuxy.dudugua.util.view.ProductView;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface ProductESRepo/* extends ElasticsearchRepository<ProductView,Integer>*/ {
    @Query("{\"bool\":{\"should\":[{\"match\":{\"productName\":\"?0\"}},{\"match\":{\"storeName \":\"?0\"}}]}")
    List<ProductView> search(String kw);
}
